import { TableConfigItemType } from "@/@types";
export const tableConfigFn = (fn) => {
  return [
    {
      label: "id",
      prop: "id",
    },
    {
      label: "账户",
      prop: "account",
    },
    {
      label: "密码",
      prop: "password",
    },
    {
      label: "地址",
      prop: "address",
    },
    {
      label: "操作",
      prop: "operate",
      render: ({ $index, row }) => {
        return (
          <my-button type="primary" size="large" onClick={() => fn("detail", row, $index)}>
            查看
          </my-button>
        );
      },
    },
  ] as TableConfigItemType[];
};
